Skip to content

repro: Android harness Metro module loading failure on RN nightly#102

Draft
hannojg wants to merge 1 commit intocallstackincubator:mainfrom
hannojg:hannojg/rn-0.86.0-nightly-20260409-android-repro
Draft

repro: Android harness Metro module loading failure on RN nightly#102
hannojg wants to merge 1 commit intocallstackincubator:mainfrom
hannojg:hannojg/rn-0.86.0-nightly-20260409-android-repro

Conversation

@hannojg
Copy link
Copy Markdown
Contributor

@hannojg hannojg commented Apr 9, 2026

Summary

This PR creates a focused reproduction for the Android harness runtime failure seen after upgrading the playground app to react-native@0.86.0-nightly-20260409-b1d12f535.

It also updates the matching @react-native/* toolchain packages to the same nightly version and keeps the runtime overlay buildable on RN 0.85+ so the repro stays isolated to the Metro module-loading path.

Context from investigation: this now looks specific to the RN nightly/Hermes nightly path. A clean react-native@0.85.0 install was reported to work, while this nightly still fails after reinstalling and rebuilding from a clean Android build.

What changed

  • upgrade react-native in apps/playground to 0.86.0-nightly-20260409-b1d12f535
  • upgrade @react-native/babel-preset, @react-native/eslint-config, @react-native/jest-preset, @react-native/metro-config, and @react-native/typescript-config to the same nightly version
  • switch the runtime overlay to StyleSheet.absoluteFill so the runtime package still builds against RN 0.85+

Reproduction

Cleaned and rebuilt before running the Android smoke test:

pnpm install --force
pnpm nx reset
pnpm nx run-many -t build --projects="packages/*"
cd apps/playground/android && ./gradlew clean
cd ../../..
pnpm nx run @react-native-harness/playground:build-android --tasks=assembleDebug
cd apps/playground
HARNESS_PROJECT_ROOT="$PWD" HARNESS_RUNNER=android HARNESS_APP_PATH=android/app/build/outputs/apk/debug/app-debug.apk HARNESS_DEBUG=true pnpm exec react-native-harness --harnessRunner android --runTestsByPath src/__tests__/smoke.harness.ts

I also reran locally with the harness Metro cache disabled and still saw the same failure. The local-only runner config was temporarily pointed at the already booted Pixel_7_Pro_API_33 emulator, then reverted before pushing.

Observed failure

2026-04-10T06:40:04.895Z [harness][plugin:playground-logging] metro.bundleFailed runId=21ac9405-7353-4b63-8f24-fd5deff1a89a target=setupFile file=src/setupFile.ts error=Parsing source code unsupported: __d(function (global, _$$_REQUIR

FAIL src/__tests__/smoke.harness.ts
  ● Test suite failed to run

    SyntaxError: Parsing source code unsupported: __d(function (global, _$$_REQUIR

      at evaluateModule (http:/localhost:8082/index.bundle/&platform=android&dev=true&lazy=true&minify=false&app=com.harnessplayground&modulesOnly=false&runModule=true&excludeSource=true&sourcePaths=url-server:109513:9)
      at anonymous (http:/localhost:8082/index.bundle/&platform=android&dev=true&lazy=true&minify=false&app=com.harnessplayground&modulesOnly=false&runModule=true&excludeSource=true&sourcePaths=url-server:109677:25)
      at asyncGeneratorStep (http:/localhost:8082/index.bundle/&platform=android&dev=true&lazy=true&minify=false&app=com.harnessplayground&modulesOnly=false&runModule=true&excludeSource=true&sourcePaths=url-server:24779:19)
      at _next (http:/localhost:8082/index.bundle/&platform=android&dev=true&lazy=true&minify=false&app=com.harnessplayground&modulesOnly=false&runModule=true&excludeSource=true&sourcePaths=url-server:24793:29)
      at tryCallOne (address at InternalBytecode.js:1:1274)
      at anonymous (address at InternalBytecode.js:1:4865)

The failure happens at runtime when the harness asks Metro to load the setup/test module, not during the Android build.

Validation

  • pnpm install --force
  • pnpm nx reset
  • pnpm nx run-many -t build --projects="packages/*"
  • cd apps/playground/android && ./gradlew clean
  • pnpm nx run @react-native-harness/playground:build-android --tasks=assembleDebug
  • Android smoke harness run fails with the parser error above on 0.86.0-nightly-20260409-b1d12f535

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 9, 2026

@hannojg is attempting to deploy a commit to the Callstack Team on Vercel.

A member of the Team first needs to authorize it.

@hannojg hannojg force-pushed the hannojg/rn-0.86.0-nightly-20260409-android-repro branch from 1dedb94 to 1d436c6 Compare April 9, 2026 10:45
@hannojg hannojg changed the title repro: Android harness Metro module loading failure on RN 0.86 nightly repro: Android harness Metro module loading failure on RN 0.85 Apr 9, 2026
@hannojg hannojg force-pushed the hannojg/rn-0.86.0-nightly-20260409-android-repro branch from 1d436c6 to 0a6d5f4 Compare April 10, 2026 06:40
@hannojg hannojg changed the title repro: Android harness Metro module loading failure on RN 0.85 repro: Android harness Metro module loading failure on RN nightly Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant